<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
</head>
<body>
<div style="width: 100%;height: 100vh;display: flex;justify-content: center;align-items: center;flex-direction: column">
    <h2 style="color: black;" id="msg">支付成功</h2>

    <button style="color: black;background-color: #129aee;color: white;width: 80px;height: 50px;border: none;border-radius: 10px" id="backBtn">点击返回</button>
</div>

<script>

    window.onload = () => {
        let btn = document.getElementById("backBtn")
        btn.onclick = ()=>{
           window.android.backCall();
        }

        let end = 5
        let msg = document.getElementById("msg")
        let inter = setInterval(()=>{
            if(end>0){
                msg.textContent  = "支付成功,"+end+"秒后返回"
                console.log("支付成功,"+end+"秒后返回")
                end --;
            }else {
                clearInterval(inter)

                window.android.backCall();
            }
        },1000)

    }
</script>
</body>
</html>
